package com.ibeetl.admin.aod.web.dto.rowmapper;

import com.ibeetl.admin.aod.web.dto.AodIndustryDataExportDto;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;


public class AodIndustryDataExcelRowMapper implements RowMapper<AodIndustryDataExportDto> {

    @Override
    public AodIndustryDataExportDto mapRow(ResultSet resultSet, int i) throws SQLException {
        AodIndustryDataExportDto aodIndustryDataExportDto = new AodIndustryDataExportDto();
        aodIndustryDataExportDto.setIndustryName(resultSet.getString("industryName"));
        aodIndustryDataExportDto.setAccount(resultSet.getString("account"));
        aodIndustryDataExportDto.setPhoneNumber(resultSet.getString("phoneNumber"));
        aodIndustryDataExportDto.setAddTime(resultSet.getTimestamp("addTime"));
        aodIndustryDataExportDto.setProvince(resultSet.getString("province"));
        aodIndustryDataExportDto.setCity(resultSet.getString("city"));
        aodIndustryDataExportDto.setCorp(resultSet.getString("corp"));
        aodIndustryDataExportDto.setLevel(resultSet.getInt("level"));
        aodIndustryDataExportDto.setSendContent(resultSet.getString("sendContent"));
        aodIndustryDataExportDto.setSendTime(resultSet.getTimestamp("sendTime"));
        aodIndustryDataExportDto.setReplyContent(resultSet.getString("replyContent"));
        aodIndustryDataExportDto.setReplyTime(resultSet.getTimestamp("replyTime"));
        aodIndustryDataExportDto.setLabel(resultSet.getString("label"));
        return aodIndustryDataExportDto;
    }
}
